public class FizzBuzz {
    private final int number;

    public FizzBuzz(int number) {
        this.number = number;
    }

    public String fizzBuzz() {
        boolean divisibleBy3 = number % 3 == 0;
        boolean divisibleBy5 = number % 5 == 0;
        boolean contains3 = String.valueOf(number).contains("3");
        boolean contains5 = String.valueOf(number).contains("5");

        // 优先检查既是3又是5的倍数的情况
        if (divisibleBy3 && divisibleBy5) {
            return "FizzBuzz";
        }
        // 然后检查包含3和5的情况
        if (contains3 && contains5) {
            return "FizzBuzz";
        }
        // 然后是单独的检查
        if (divisibleBy3 || contains3) {
            return "Fizz";
        }
        if (divisibleBy5 || contains5) {
            return "Buzz";
        }
        return String.valueOf(number);
    }
}